#ifndef __THEME_SPRITE_H__
#define __THEME_SPRITE_H__

#include "cocos2d.h"
using namespace cocos2d;
using namespace std;

class ThemeSprite : public CCSprite,public CCTouchDelegate{
public:

	virtual bool init();
	virtual bool ccTouchBegan(CCTouch * pTouch ,CCEvent * pEvent);
	virtual void ccTouchMoved(CCTouch * ,CCEvent *);
	virtual void ccTouchEnded(CCTouch * ,CCEvent *);
	virtual void registerWithTouchDispatcher();
	virtual void setTouchEnabled(bool enabled);
	virtual void onExit();


	void startScene();
	void setName(const char * );
	void setThumbPath(const char * );
	void setCategory(int );
	void setId(int id);

	CREATE_FUNC(ThemeSprite);

private:

	bool isTouchInView(CCPoint point);

	char  m_sName[32];
	char  m_thumbPath[64];
	bool m_bDown ;
	CCPoint m_downPoint ;
	bool m_bTouchEnabled;
	int m_category;
	int m_id;


};

#endif
